import request from '../utils/request'//引入request.js，它封装了axios请求处理

export default{
  /* 
  获取所有部门带分页
   */
  getList(data){
    return request.post(`/api/management-center/department/page`,data)
  },
  //获取所有部门
  queryAllDept(data){
    return request.post(`/api/management-center/department/queryAllDept`,data)
  },
  // 查询部门关联员工
  departmentByUser(data) {
    return request.post(`/api/management-center/department/departmentByUser`,data)
  },
  // 查询部门关联员工的年度出勤记录
  departmentByUserReturnAttendance(data) {
    return request.post(`/api/management-center/department/departmentByUserReturnAttendance`,data)
  },  
  //查询所有部门,解析为部门树
  listDept(data) {
    return request.post(`/api/management-center/department/list`,data)
  },  
  //删除部门
  delCustomer(departmentId){
    return request.post(`/api/management-center/department/delete`,departmentId)
  },
  //部门出勤统计
  queryAllDeptAttendance(data){
    return request.post(`/api/management-center/department/queryAllDeptAttendance`,data)
  },
  //保存部门
  save(data){
    return request.post(`/api/management-center/department/save`,data)
  },
  //保存部门员工
  saveDeptRelationUser(data){
    return request.post(`/api/management-center/department/saveDeptRelationUser`,data)
  },
  //查询当前登录人的直系领导和上级领导
  queryUserByDept(data){
    return request.post(`/api/management-center/department/queryUserByDept`,data)
  },
  //批量删除部门
  deleteCustomerByIds(departmentIds){
    return request.post(`/api/management-center/department/deleteByIds`,departmentIds)
  },

  //根据部门id查询部门详情
  selectCustomerById(departmentId){
    return request.post(`/api/management-center/department/selectCustomerById`,departmentId)
  },

  //修改部门
  updateCustomer(data){
    return request.post(`/api/management-center/department/updateCustomer`,data)
  },
  //导出部门
  exportCustomer(data){
    return request.post(`/api/management-center/department/exportCustomer`,data)
  },
  //导出选择的部门
  exportSelectCustomer(departmentIds){
    return request.post(`/api/management-center/department/exportSelectCustomer`,departmentIds)
  },
  //导出选择的部门
  departmentByUser(departmentId){
    return request.post(`/api/management-center/department/departmentByUser`,departmentId)
  }
}
